<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录成功 - ShopEase电商平台</title>
    <!-- Tailwind CSS v3 -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- Font Awesome -->
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">

    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#2563EB',
                        secondary: '#F97316',
                        success: '#10B981',
                        neutral: {
                            50: '#F8FAFC',
                            100: '#F1F5F9',
                            200: '#E2E8F0',
                            300: '#CBD5E1',
                            400: '#94A3B8',
                            500: '#64748B',
                            600: '#475569',
                            700: '#334155',
                            800: '#1E293B',
                            900: '#0F172A',
                        }
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                    animation: {
                        'bounce-slow': 'bounce 2s infinite',
                        'fade-in': 'fadeIn 0.5s ease-in-out',
                        'countdown': 'countdown 5s linear forwards',
                    },
                    keyframes: {
                        fadeIn: {
                            '0%': { opacity: '0' },
                            '100%': { opacity: '1' },
                        },
                        countdown: {
                            '0%': { width: '100%' },
                            '100%': { width: '0%' },
                        }
                    }
                },
            }
        }
    </script>

    <style type="text/tailwindcss">
        @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .btn-effect {
        @apply transition-all duration-300 hover:shadow-lg hover:-translate-y-0.5 active:translate-y-0;
      }
      .countdown-circle {
        @apply w-16 h-16 rounded-full border-4 border-success border-t-transparent animate-spin;
      }
    }
  </style>
</head>

<body class="font-inter bg-neutral-50 min-h-screen flex flex-col">
    <!-- 顶部通知栏 -->
    <div class="bg-primary text-white text-center py-2 text-sm">
        <p>🎉 会员专享：今日购物额外95折 | 订单满299元赠精美礼品</p>
    </div>

    <!-- 导航栏 -->
    <header class="bg-white shadow-sm">
        <div class="container mx-auto px-4 py-4 flex items-center justify-between">
            <a href="index.html" class="flex items-center space-x-2">
                <div class="w-10 h-10 rounded-lg bg-primary flex items-center justify-center">
                    <i class="fa fa-shopping-bag text-white text-xl"></i>
                </div>
                <span class="text-xl font-bold text-neutral-800">ShopEase</span>
            </a>

            <nav class="hidden md:flex items-center space-x-8">
                <a href="index.html" class="text-primary font-medium">首页</a>
                <a href="#" class="text-neutral-600 hover:text-primary transition-colors">商品分类</a>
                <a href="#" class="text-neutral-600 hover:text-primary transition-colors">优惠活动</a>
                <a href="#" class="text-neutral-600 hover:text-primary transition-colors">会员中心</a>
            </nav>

            <div class="flex items-center space-x-6">
                <a href="#" class="relative text-neutral-600 hover:text-primary transition-colors">
                    <i class="fa fa-heart-o text-xl"></i>
                    <span
                        class="absolute -top-2 -right-2 bg-secondary text-white text-xs rounded-full w-5 h-5 flex items-center justify-center">3</span>
                </a>
                <a href="#" class="relative text-neutral-600 hover:text-primary transition-colors">
                    <i class="fa fa-shopping-cart text-xl"></i>
                    <span
                        class="absolute -top-2 -right-2 bg-secondary text-white text-xs rounded-full w-5 h-5 flex items-center justify-center">2</span>
                </a>
                <!-- 登录用户信息 -->
                <div class="relative group">
                    <button class="flex items-center space-x-1 text-neutral-700 hover:text-primary transition-colors">
                        <img src="https://picsum.photos/seed/user/100/100" alt="用户头像"
                            class="w-8 h-8 rounded-full object-cover border-2 border-white shadow-sm">
                        <span class="hidden md:inline font-medium">张小明</span>
                        <i class="fa fa-chevron-down text-xs"></i>
                    </button>
                    <!-- 下拉菜单 -->
                    <div
                        class="absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-neutral-100 py-2 z-50 hidden group-hover:block animate-fade-in">
                        <a href="#"
                            class="block px-4 py-2 text-sm text-neutral-700 hover:bg-neutral-50 hover:text-primary transition-colors">
                            <i class="fa fa-user-o mr-2"></i> 个人中心
                        </a>
                        <a href="#"
                            class="block px-4 py-2 text-sm text-neutral-700 hover:bg-neutral-50 hover:text-primary transition-colors">
                            <i class="fa fa-list-alt mr-2"></i> 我的订单
                        </a>
                        <a href="#"
                            class="block px-4 py-2 text-sm text-neutral-700 hover:bg-neutral-50 hover:text-primary transition-colors">
                            <i class="fa fa-cog mr-2"></i> 账户设置
                        </a>
                        <div class="border-t border-neutral-100 my-1"></div>
                        <a href="login.html"
                            class="block px-4 py-2 text-sm text-danger hover:bg-neutral-50 transition-colors">
                            <i class="fa fa-sign-out mr-2"></i> 退出登录
                        </a>
                    </div>
                </div>
                <button class="md:hidden text-neutral-700">
                    <i class="fa fa-bars text-xl"></i>
                </button>
            </div>
        </div>
    </header>

    <!-- 主要内容 -->
    <main class="flex-grow flex items-center justify-center px-4 py-16">
        <div class="container mx-auto max-w-md w-full">
            <div class="bg-white rounded-2xl shadow-lg overflow-hidden animate-fade-in">
                <!-- 成功提示区域 -->
                <div class="p-8 text-center">
                    <div class="relative mb-8">
                        <div class="w-20 h-20 bg-success/10 rounded-full flex items-center justify-center mx-auto">
                            <i class="fa fa-check text-3xl text-success"></i>
                        </div>
                        <!-- 倒计时进度条 -->
                        <div class="mt-4 h-1.5 w-full bg-neutral-100 rounded-full overflow-hidden">
                            <div id="countdownBar" class="h-full bg-success rounded-full animate-countdown"></div>
                        </div>
                    </div>

                    <h1 class="text-2xl font-bold text-neutral-800 mb-2">登录成功！</h1>
                    <p class="text-neutral-500 mb-4">欢迎回来，<span class="font-medium text-primary">张小明</span>！</p>

                    <!-- 倒计时显示 -->
                    <p class="text-neutral-600 mb-8">
                        <i class="fa fa-clock-o mr-1"></i> 页面将在 <span id="countdown"
                            class="font-semibold text-primary">5</span> 秒后自动跳转至首页
                    </p>

                    <!-- 主要操作按钮 -->
                    <a href="index.html"
                        class="btn-effect bg-primary text-white font-medium py-3 px-6 rounded-lg block">
                        <i class="fa fa-arrow-right mr-2"></i> 立即跳转
                    </a>
                </div>

                <!-- 新人福利区域 -->
                <div class="bg-primary/5 p-6 border-t border-primary/10">
                    <h3 class="font-medium text-neutral-800 mb-4 flex items-center">
                        <i class="fa fa-gift text-secondary mr-2"></i> 会员专享福利
                    </h3>
                    <div class="space-y-3">
                        <div class="flex items-start">
                            <div
                                class="w-6 h-6 rounded-full bg-secondary/10 flex items-center justify-center mr-3 mt-0.5 flex-shrink-0">
                                <i class="fa fa-ticket text-secondary text-xs"></i>
                            </div>
                            <p class="text-sm text-neutral-600">满200元减30元优惠券已放入您的账户</p>
                        </div>
                        <div class="flex items-start">
                            <div
                                class="w-6 h-6 rounded-full bg-secondary/10 flex items-center justify-center mr-3 mt-0.5 flex-shrink-0">
                                <i class="fa fa-clock-o text-secondary text-xs"></i>
                            </div>
                            <p class="text-sm text-neutral-600">今日下单可享额外95折优惠</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="bg-white border-t border-neutral-200 py-8">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <p class="text-neutral-500 text-sm mb-4 md:mb-0">© 2023 ShopEase 电商平台 版权所有</p>
                <div class="flex space-x-6">
                    <a href="#" class="text-neutral-500 hover:text-primary transition-colors text-sm">隐私政策</a>
                    <a href="#" class="text-neutral-500 hover:text-primary transition-colors text-sm">用户协议</a>
                    <a href="#" class="text-neutral-500 hover:text-primary transition-colors text-sm">帮助中心</a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // 倒计时功能
        let countdown = 5;
        const countdownElement = document.getElementById('countdown');

        // 每秒更新倒计时
        const timer = setInterval(() => {
            countdown--;
            countdownElement.textContent = countdown;

            if (countdown <= 0) {
                clearInterval(timer);
                window.location.href = 'index.html'; // 跳转到首页
            }
        }, 1000);

        // 为立即跳转按钮添加点击事件，停止倒计时并跳转
        document.querySelector('a[href="index.html"]').addEventListener('click', function (e) {
            e.preventDefault();
            clearInterval(timer);
            window.location.href = 'index.html';
        });
    </script>
</body>

</html>